﻿using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace StableDiffusionTools.Imaging
{
    public class BitmapResizeSettings
    {
        public Size ResizeSize { get; set; }
        public double ResizeScalar { get; set; } = double.NaN;
        public bool MaintainAspectRatio { get; set; } = true;
        public bool AddPadding { get; set; } = false;
        public Color PaddingColor { get; set; } = Color.White;

        public bool ResizeSizeNotEmpty
        {
            get { return !ResizeSize.IsEmpty; }
        }


        public BitmapResizeSettings(double scalar = 1.0)
        {
            ResizeScalar = scalar;
        }

        public BitmapResizeSettings() : this(default(Size)) { }
        public BitmapResizeSettings(Size size = default(Size))
        {
            if (!size.IsEmpty)
                ResizeSize = size;
        }
    }
}
